#!/bin/bash

S='
<window title="'$(gettext "Time Wizard")'" icon-name="gtk-connect">
<vbox space-expand="true" space-fill="true">
  '"`/usr/lib/gtkdialog/xml_info fixed date_time.svg 40 "$(gettext "Date and time configuration")"`"'
  <vbox space-expand="true" space-fill="true">
    <frame '$(gettext 'Date and time')'>
      <vbox space-expand="false" space-fill="false">

        <hbox space-expand="true" space-fill="true">
          <text space-expand="false" space-fill="false"><label>'$(gettext "Set date and time")'</label></text>
          <button space-expand="false" space-fill="false">
            '"`/usr/lib/gtkdialog/xml_button-icon date_time.svg big`"'
            <action>set-time-for-puppy &</action>
          </button>
        </hbox>

        <hbox space-expand="true" space-fill="true">
          <text space-expand="false" space-fill="false"><label>'$(gettext "Set timezone")'</label></text>
          <button space-expand="false" space-fill="false">
            '"`/usr/lib/gtkdialog/xml_button-icon country_timezone.svg big`"'
            <action>timezone-set &</action>
          </button>
        </hbox>

        <hbox space-expand="true" space-fill="true">
          <text space-expand="false" space-fill="false"><label>'$(gettext "Set hardware-clock type")'</label></text>
          <button space-expand="false" space-fill="false">
            '"`/usr/lib/gtkdialog/xml_button-icon clock.svg big`"'
            <action>set_hwclock_type &</action>
          </button>
        </hbox>

        <hbox space-expand="true" space-fill="true">
          <text space-expand="false" space-fill="false"><label>'$(gettext "Syncronize with time-server")'</label></text>
          <button space-expand="false" space-fill="false">
            '"`/usr/lib/gtkdialog/xml_button-icon clock_countdown.svg big`"'
            <action>psync &</action>
          </button>
        </hbox>'

        [[ "`ps -A | grep jwm`" && -s /usr/local/jwm_config/tray ]] && S=$S'
        <hbox space-expand="true" space-fill="true">
          <text space-expand="false" space-fill="false"><label>'$(gettext "Set tray clock-format")'</label></text>
          <button space-expand="false" space-fill="false">
            '"`/usr/lib/gtkdialog/xml_button-icon clock_digital.svg big`"'
            <action>/usr/local/jwm_config/tray -clock &</action>
          </button>
        </hbox>'

        [ "`which pschedule`" ] && S=$S'
        <hbox space-expand="true" space-fill="true">
          <text space-expand="false" space-fill="false"><label>'$(gettext "Task scheduler")'</label></text>
          <button space-expand="false" space-fill="false">
            '"`/usr/lib/gtkdialog/xml_button-icon execute_interval.svg big`"'
            <action>pschedule &</action>
          </button>
        </hbox>'

       S=$S'
      </vbox>
    </frame>
  </vbox>

  <hbox space-expand="false" space-fill="false">
    <text space-expand="true" space-fill="true"><label>""</label></text>
    <button space-expand="false" space-fill="false">
      <label>'$(gettext "Ok")'</label>
      '"`/usr/lib/gtkdialog/xml_button-icon ok`"'
      <action>exit:OK</action>
    </button>
  </hbox>
</vbox>
</window>'

export TimeWizard="$S"
. /usr/lib/gtkdialog/xml_info gtk #build bg_pixmap for gtk-theme
RETSTR="`gtkdialog -p TimeWizard`" 